<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>canvas系列课程</title>
</head>
<body>
</body>
<canvas id="hert" width="200" height="200"></canvas>
<script type="text/javascript">
	var c=document.getElementById("hert");
	var cxt=c.getContext("2d");
	cxt.beginPath();
	cxt.fillStyle='red';
	cxt.strokeStyle='red';
	cxt.moveTo(75,40);
	cxt.bezierCurveTo(75,37,70,25,50,25);
	cxt.bezierCurveTo(20,25,20,62.5,20,62.5);
	cxt.bezierCurveTo(20,80,40,102,75,120);
	cxt.bezierCurveTo(110,102,130,80,130,62.5);
	cxt.bezierCurveTo(130,62.5,130,25,100,25);
	cxt.bezierCurveTo(85,25,75,37,75,40);
	cxt.fill();
	cxt.stroke();
</script>
</html>
